#include <iostream>
#include <climits>
#include <vector>

using namespace std;
typedef long long ll;

int main()
{
	int n, x;
	cin >> n >> x;
	vector<int> vt(n);
	for (int i = 0; i < n; ++i)
		scanf("%d", &vt[i]);
	int len = INT_MAX;
	int l = 0, r = 1;
	int fl, fr;
	ll sum = vt[l];
	while (r < n)
	{
		sum += vt[r];
		if (sum >= x)
		{
			while (sum >= x)
			{
				if (sum - vt[l] < x)
					break;
				else
				{
					sum -= vt[l];
					++l;
				}
			}
			if (r - l + 1 < len)
			{
				fl = l;
				fr = r;
				len = r - l + 1;
			}
		}
		++r;
	}
	cout << fl + 1 << ' ' << fr + 1 << endl;
	return 0;
}